<!--top结束-->
<div class="mian">
	<div class="mian1">
		<div class="mian2">
			<!--left start-->
            <?php $this->load->view('defaults/common/left');?>
			<!--left end-->
			
			<!--right start-->
			<div class="right">
				<!--breadcrumb start-->
				<div class="righta"><?=$this->breadcrumb->generateHTML();?> </div>
				<!--breadcrumb end-->
				<!-- contents start -->
				<div id="contents">
                  
            <div class="ct_content">
                    <div id="ct_header">
                        <style>
                            #table_forms td{border: 1px solid #00ccff;}
                        </style>
                        <table cellpadding="0"  id="table_forms" border="1">
                            <tr>
                                <td >
                                    <?= lang('wms_panel_30014') ?>:<?=$package_id?>
                                </td>
                                <td >
                                    <?= lang('wms_panel_30020') ?>:<?=$whs_code?>
                                </td>
                                <td >
                                    <?= lang('wms_panel_30021') ?>:<?=$destination_whs_code?>
                                </td>
                            </tr>
                            <tr>
                                <td >
                                    <?= lang('wms_panel_30017') ?>:<?=$created_account?>
                                </td>
                                <td >
                                    <?= lang('wms_panel_30015') ?>:<?=$created_time?>
                                </td>
                                <td >
                                    <?= lang('wms_panel_30022') ?>:<?=$package_type?>
                                </td>
                            </tr>
                            <tr>
                                <td >
                                     <?= lang('wms_panel_30024') ?>:<?php if(1==$package_status):?><input id="track_id" type="text" name="track_id" placeholder="<?= lang('wms_panel_30023') ?>" value=""/><?php else: ?><?=$track_id?><?php endif; ?>
                                </td>
                                <td >
                                    <?=lang('order_zt')?>:<?=$status_view[$package_status]?>
                                </td>
                                <td >
                                    <?= lang('wms_panel_30018') ?>:<?php if(1==$package_status):?> <input type="submit" value=" <?= lang('wms_panel_30025') ?>" onclick="shipped()">
                                        <?php elseif('china'==$panel_type&&2==$package_status):?>
                                     <input type="submit" value=" <?= lang('wms_panel_30026') ?>" onclick="clean()"><?php endif; ?>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <!-- 列表展示开始List start -->
                    <?php if($items):?>
                    <div class="ct_content">
                        <p><span><?=lang('order_cplb')?></span></p>
                        <table class="c_c_tables tbwd800" cellspacing="0">
                            <thead>
                            <tr>
                                <th><?= lang('wms_panel_30024') ?></th>
                                <th><?=lang('wms_sl')?></th>
                                <?php if(in_array($package_status,array(2,3))):?><th><?= lang('wms_panel_30027') ?></th><?php endif; ?>
                                <th>PID</th>
                                <th><?= lang('wms_panel_30011') ?></th>
                                <th><?= lang('wms_mc') ?></th>
                                <th><?= lang('wms_panel_30018') ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php foreach ($items as $key=>$rs):?>
                                <tr align="center">
                                    <td><?=$rs['sku']?></td>
                                    <td><?=$rs['product_quantity']?></td>
                                    <?php if(in_array($package_status,array(2,3))):?><td><?=$rs['receive_qty']?></td><?php endif; ?>
                                    <td><?=$rs['']?></td>
                                    <td><?=$rs['']?></td>
                                    <td><?=$rs['product_name']?></td>
                                    <td><?php if('china'==$panel_type&&2==$package_status&&($rs['product_quantity']-$rs['receive_qty'])>0):?><form id='receive_<?=$rs['package_product_id']?>' action="<?= blang_url('wms/PackegeList/receive_package_product').'/'.MD5($panel_type.  date("d")) ?>" method="post" name="myform" onsubmit="return myform_submit()" autocomplete="off" ><input id="qty_<?=$rs['id']?>" type="text" placeholder="<?= lang('wms_panel_30007') ?>" style=" width: 50px" name="qty"  value="<?=($rs['product_quantity']-$rs['receive_qty'])?>"/>
                                            <input type="hidden" name='package_product_id' value="<?=$rs['package_product_id']?>" /><input type="hidden" name='package_id' value="<?=$package_id?>" /><input type="submit" value=" <?= lang('wms_panel_30028') ?>" ><?php endif; ?></form></td>
                                </tr>
                            <?php endforeach;?>
                            </tbody>
                        </table>
                    </div>
                    <?php endif; ?>
                    <!-- 1列表展示开始List end -->

				</div>
				<!-- contents end -->
			</div>
			<!--right end-->
           <div class="clear"></div>
		</div>
	</div>
</div>
<script type="text/javascript">
    function shipped(){
        //loading层
        var track_id =$('#track_id').val();
        if(''!=track_id){
          window.location.href='<?= blang_url('wms/PackegeList/shipped') ?>'+'/'+'<?=$package_id?>'+'_'+track_id +'_<?=MD5($panel_type.  date("d"))?>';
        }

    }
    function clean(){
        //loading层
        if(''!=track_id){
          window.location.href='<?= blang_url('wms/PackegeList/receive_clean') ?>'+'/'+'<?=$package_id?>'+'_<?=MD5($panel_type.  date("d"))?>';
        }

    }
</script>
